﻿@model  IEnumerable<WebVideo.EntityUser>
<div class="top-user bg-color-MediumSeaGreen">
    <h4><span>Thành viên có điểm cao nhất</span></h4>
    <div class="inner-top-user">
        @{ 
       
    
            foreach (var item in Model)
            {
                if (System.Web.HttpContext.Current.Request.Cookies["UserId"] != null)
                {
                      <a class="item" href="@Url.Action("ThongTinCaNhan", "Individual", new { Friend =item.UserName},null)">
                        @{  if (@item.Avatar !=null)
                            {
                                <img src="../../Content/Images/Avatar/@item.Avatar" />
                            }
                            else
                            {
                                <img src="../../Content/cssFrontEnd/images/avatar.jpg" />
                            }}
                
                         <span>@item.UserName</span>
                        
                           @{ int? diem = item.PointVideo + item.PointFriend2 + item.PointFriend1;

                            if (diem != null)
                            {
                                <b>@diem</b>
                            }
                            else
                            {
                                <b>0</b>
                            }}
                        </a>
                
                }  
                else
                {
                     <a class="item" href="#">
                        @{  if (@item.Avatar != null)
                            {
                                <img src="../../Content/Images/Avatar/@item.Avatar" />
                            }
                            else
                            {
                                <img src="../../Content/cssFrontEnd/images/avatar.jpg" />
                            }}
                
                         <span>@item.UserName</span>
                        
                           @{ int? diem = item.PointVideo + item.PointFriend2 + item.PointFriend1;

                            if (diem != null)
                            {
                                <b>@diem</b>
                            }
                            else
                            {
                                <b>0</b>
                            }}
                        </a>
                }
            }
        }
    </div>

</div>
<!--/ .top-user-->
